﻿
namespace BEGDC.PreContract.DAL
{
    using System;
    using System.Collections.Generic;
    using Castle.ActiveRecord;
    using NHibernate.Expression;


    [ActiveRecord]
    public partial class BDAssignment : ActiveRecordBase<BDAssignment>
    {
		#region Const Definition
		
		public const string CONST_BDAssignmentID						= "BDAssignmentID";
		public const string CONST_EmployeeID							= "EmployeeID";
		public const string CONST_BDID									= "BDID";

		#endregion
		
        #region Member Variables
        // Primary Key
        private System.Int32 _bDAssignmentID;
        
        // Non Key

        // Parents
        private Employee _employeeID;
        private BD _bDID;
        
        
		

        #endregion

        public BDAssignment() {
               
        }
        
        #region Properties
        // Primary Key        
		
		#if (SQLServer)
        [PrimaryKey]
		#else
		[PrimaryKey(PrimaryKeyType.Native, SequenceName = "SEQ_BDASSIGNMENT_BDASSIGNMENTID")]
		#endif
        public System.Int32 BDAssignmentID {
            get { return this._bDAssignmentID; }
            set {  this._bDAssignmentID = value; }
        }
        
        // Non Key
        
        // Parent Relationships
        [BelongsTo("EmployeeID")]
        public Employee EmployeeID {
            get { return this._employeeID; }
            set { this._employeeID = value; }
        }
        
        [BelongsTo("BDID")]
        public BD BDID {
            get { return this._bDID; }
            set { this._bDID = value; }
        }
        
        // Child Relationships
        
		
        #endregion
		
		// Clone
		public BDAssignment Clone()
		{
			BDAssignment newBDAssignment = new BDAssignment();
			
            newBDAssignment.EmployeeID = this._employeeID ; 
            newBDAssignment.BDID = this._bDID ; 
			return newBDAssignment;
		}
    }
}



